Skip to content

Conversation

@bniladridas
Copy link
Member

@bniladridas bniladridas commented Nov 22, 2025

Summary

Suppress the noisy PostCSS dev warning and modernize logging behavior.

Changes

  • Add Vite plugin to filter out the specific PostCSS warning in console
  • Improve logger with timestamps, colored output, and LOG_LEVEL support
  • Update logger tests for timestamped output and LOG_LEVEL env var
  • Allow prefixed unused params in ESLint (_param)
  • Add postcss.config.js to resolve warnings
  • Add type safety to PostCSS warning suppression
  • Refactor logger to extract getCurrentLogLevelValue helper and remove duplicate logic
  • Fix minor lint issues in server error handler
  • Update package-lock due to dependency adjustments

Result

Cleaner dev console output with all checks passing and no functional regressions.

Enhanced logger with timestamps, colors, and dynamic log levels.
Suppressed PostCSS warning in dev and updated ESLint rules.
@vercel
Copy link

vercel bot commented Nov 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
autofix Ready Ready Preview Comment Nov 22, 2025 1:09pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @bniladridas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on improving the developer experience by cleaning up the console output and modernizing the logging system. It addresses a persistent PostCSS warning by implementing a custom Vite plugin and significantly enhances the shared logger with features like timestamps, colored output, and configurable log levels. Additionally, it refines ESLint rules to be more flexible with unused parameters and adjusts PostCSS dependencies for better compatibility.

Highlights

  • PostCSS Warning Suppression: A new Vite plugin has been introduced to filter out a specific noisy PostCSS warning in the development console, leading to cleaner output.
  • Enhanced Logger Utility: The shared logger utility has been significantly upgraded to include timestamps, colored output based on log level, and support for a 'LOG_LEVEL' environment variable for granular control. A new 'json' logging method was also added for structured output.
  • Logger Test Updates: Corresponding tests for the logger were updated to reflect the new timestamped output format and to validate the 'LOG_LEVEL' environment variable functionality.
  • ESLint Configuration Adjustment: The ESLint configuration was updated to allow unused parameters prefixed with an underscore ('_param'), reducing the need for explicit 'eslint-disable' comments.
  • PostCSS Downgrade and Configuration Removal: The 'postcss.config.js' file was removed, and the PostCSS dependency was downgraded to version '8.4.40' for compatibility reasons.
  • Server Error Handler Lint Fix: Minor lint issues in the server error handler in 'apps/server/index.ts' were resolved by simplifying 'eslint-disable' comments.
  • Dependency Updates: The 'package-lock.json' file was updated to reflect changes in dependencies, including the PostCSS downgrade and the addition of '@tailwindcss/postcss'.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several good changes, including suppressing a noisy PostCSS warning, modernizing the logger, and improving ESLint configuration. The changes are generally well-implemented. I've provided a few suggestions to improve type safety, maintainability, and robustness in the logger and Vite configuration. Specifically, I've recommended using a more specific type for error handling, refactoring the logger to avoid code duplication, and using Vite's dedicated logger API instead of monkey-patching the global console.

vite.config.ts Outdated
Comment on lines 15 to 22
configureServer(_server) {
const originalWarn = console.warn;
console.warn = (message, ...args) => {
if (message.includes('PostCSS plugin did not pass the `from` option'))
return;
originalWarn(message, ...args);
};
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Monkey-patching the global console.warn is risky as it can affect other parts of your application or dependencies in unexpected ways, and makes debugging harder. A safer approach is to modify Vite's specific logger instance, which is provided as the server argument in the configureServer hook.

Additionally, it's good practice to check if the message is a string before calling string methods on it to prevent potential runtime errors, as the first argument to console.warn is not guaranteed to be a string.

      configureServer(server) {
        const originalWarn = server.logger.warn;
        server.logger.warn = (message, ...args) => {
          if (
            typeof message === 'string' &&
            message.includes('PostCSS plugin did not pass the `from` option')
          ) {
            return;
          }
          originalWarn(message, ...args);
        };
      },

bniladridas and others added 2 commits November 22, 2025 18:31
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
… duplicate logic

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@bniladridas bniladridas changed the title chore: suppress PostCSS warning and enhance logger chore: suppress PostCSS warning and enhance logger Nov 22, 2025
@bniladridas bniladridas merged commit 8290128 into main Nov 22, 2025
8 checks passed
@bniladridas bniladridas deleted the chore/postcss-warning-cleanup branch November 22, 2025 13:11
@github-project-automation github-project-automation bot moved this from Todo to Done in Project for autofix Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants